package com.wchen.project;

import com.wchen.project.common.constant.Constant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;


@SpringBootApplication
@EnableScheduling
@EnableAsync
public class ProjectServiceApplication {
    private static Logger logger = LoggerFactory.getLogger(ProjectServiceApplication.class);

    public static void main(String[] args) throws InterruptedException {
        if (args.length != 0) {
            Constant.cookie = args[0];
            logger.info("************Constant.cookie : " + Constant.cookie);
        }

        ApplicationContext ctx = new SpringApplicationBuilder()
                .sources(ProjectServiceApplication.class).web(false).run(args);
        logger.info(" ProjectService started!");

    }

}
